import { Application } from 'egg';

export default (app: Application) => {
    const { CHAR, STRING } = app.Sequelize;
    const model = app.model.define('IdentifyingCode', {
        identifying_code_id: { type: CHAR(32), primaryKey: true },//主键
        identifying_code: CHAR(6),//验证码
        phone: STRING(15),//手机号
        identifying_type: CHAR(1),//类型（1：注册，2：活动，3：报名）
    }, { tableName: 't_identifying_code' });
    return model;
};

export class IdentifyingCode {
    identifying_code_id: string;
    identifying_code: string;
    phone: string;
    identifying_type: string;
}
